<@admin.header title="系统消息推送列表">
<script type="text/javascript">
    $(document).ready(function(){
    	App.ns('PushMsg');
		
		
		PushMsg.form = new App.common.Form({
			base:'${base}/pushmsg'
		});
		
		
		PushMsg.search = function(){
			$('#searchForm').submit();
		}
		PushMsg.delAll = function(){
			var ids = PushMsg.form.getCheckboxValues();
			PushMsg.form.deleteRecord(ids);
		}
		
		PushMsg.del = function(ids){
			PushMsg.form.deleteRecord(ids);
		}
    });
</script>
</@admin.header>
    <body>
        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li>
                    <a href="#">首页</a>
                </li>
                <li>
                    <a href="list.do">系统消息推送管理</a>
                </li>
                <li>
                    <a href="#">系统消息推送列表</a>
                </li>
            </ul>
        </div>
        <div class="rightinfo">
        	<!--默认查询表单-->
        <form action="list.do" method="get" id="searchForm">
            <input type="hidden" name="pageNo" value="1"/>
            <div class="tools">
                <ul class="toolbar">
                    <li class="click">
                        <a href="add.do"><span><img src="${base}/resources/images/t01.png" /></span>添加</a>
                    </li>
                    <li>
                        <a href="javascript:PushMsg.delAll();"><span><img src="${base}/resources/images/t03.png" /></span>删除</a>
                    </li>
                    <li style="padding:0 0">
                        <span style="margin:0px 5px">关键字</span>
	                	<input name="searchText" type="text" class="dfinput" style="width:160px;" />&nbsp;
                    </li>
                    <li>
						<a href="javascript:PushMsg.search()"><span><img src="${base}/resources/images/search24.png" /></span>查找</a>
                    </li>
                </ul>
            </div>
			</form>
            <table class="tablelist">
                <thead>
                    <tr>
						<th width="30"><input name="" type="checkbox" onclick="PushMsg.form.checkToggle('ids',this);"/></th>
						<th width="50">编号<i class="sort"><img src="${base}/resources/images/px.gif" /></i></th>
						<th width="80">标题</th>
						<th width="120">内容</th>
						<th width="50">接收人</th>
						<th width="40">状态</th>
                        <th width="100">发布时间</th>
                        <th width="80">操作</th>
                    </tr>
                </thead>
                <tbody>
                	
                	<#if page??>
					<#list page.list as d>
                    <tr id="tr_${d.id}">
                        <td>
                             <input name="ids" type="checkbox" value="${d.id}" />
                        </td>
						<td>${d_index+1}</td>
                        <td>${abbreviate(d.title!'',20,'...')}</td>
                        <td>${abbreviate(d.content!'',20,'...')}</td>
						<td><a href="javascript:void(0);" title="发送给：${d.receiveNames!''}">${abbreviate(d.receiveNames!'',10,'...')}</a></td>
						<td><a href="javascript:void(0);" title="计划于：${d.planTime!''} 发送">${d.statusMessage!''}</a></td>
						<td>
							<#if d.sendDate??>
							${d.sendDate!''}
							<#elseif d.planTime??>
							计划于：${d.planTime!''} 发送	
							</#if>
							</td>
                        <td>
                        	<#if d.status!="SENDED">
                            <a href="edit.do?id=${d.id}" class="tablelink">修改</a>
							&nbsp;
                        	<a href="javascript:PushMsg.del('${d.id}')" class="tablelink">删除</a>
							</#if>
                        </td>
                    </tr>
					</#list>
					</#if>
                </tbody>
            </table>
			<@common.pagination />
        </div>
    </body>
</html>